package com.web.exiaodao.remote.service;

import com.web.exiaodao.business.entity.Comment;
import com.web.exiaodao.remote.vo.CommentVo;
import com.web.webstart.base.service.ApiBaseService;
import com.web.webstart.base.util.result.XaResult;
import com.web.webstart.base.exception.BusinessException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;


public interface ApiCommentService extends ApiBaseService<CommentVo, Comment> {

    public XaResult<Page<CommentVo>> findListNEStatusByFilterPage(
            Integer status, Map<String, Object> filterParams, Pageable pageable)
            throws BusinessException;

    //删除评论
    public XaResult<CommentVo> deleteCommentById(Long commontId, Long userId) throws BusinessException;

    //删除评论
    public XaResult<CommentVo> saveComment(Comment model) throws Exception;

    /**
     * 查询指定的酒店(机构)的评论
     * 酒店type type {@link com.web.exiaodao.business.constant.JConstant.Order_CommentType HOURSE}
     * @param institutionId 机构的id 不能是null
     * @param userId 用户id 可以为null
     * @param pageable 分页 不能为null
     * @return
     * @throws BusinessException
     * @author duandazhi
     * @date 2017/1/2 下午6:29
     */
    public XaResult<List<CommentVo>> findInstitutionCommonts(Long institutionId, Long userId,
                                                      Pageable pageable) throws BusinessException;
}
